<template>
    <div id="selectHouse">
      <p style="padding: 10px">系统检测到您名下都多处房产，请选择要进行危房改造的农房</p>
      <ul>
        <li
          v-for="(item,index) in listData"
          :key="index"
          :style="{ borderBottom:index==listData.length-1?'1px solid #d2d2d2':''}"
          @click="selectData(item)"
        >
          <p>房屋地址：{{item.XXDZ}}</p>
          <p>房屋面积：{{item.JZMJ}} (m²)</p>
          <p>房屋层数：{{item.JZCS}} (层)</p>
          <p>建筑年份：{{item.JSNF}} (年)</p>
        </li>
      </ul>
    </div>
</template>

<script>
  export default {
    name: "selectHouse",
    data(){
      return{
        listData:[
        ]
      }
    },
    methods:{
      selectData(item){
        this.$router.push({
          path: "/RebuildPanel",
          query: { data: JSON.stringify(item) },
        });
      }
    },
    mounted(){
      this.listData = this.$route.query.data
      if (ZWJSBridge) {
        ZWJSBridge.setTitle({
          title: '粤政易'
        })
          .then(res => {
          })
          .catch(err => {
          })
      }
    }
  };
</script>

<style scoped lang="scss">
  #selectHouse{
    height: 100vh;
    overflow: auto;
    ul li{
      height: auto;
      border-top: 1px solid #d2d2d2;
      padding: 10px;
      p{
        margin-bottom: 10px;
      }
    }
  }

</style>
